﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>大沽河地下水监测系统 [天佳软件]</title>
    <style type="text/css">
		td { font-size: 12px }
		.TableControl { BACKGROUND: #eff7ff }
	</style>
	<link href="App_Themes/default/stylesheet.css" type="text/css" rel="stylesheet" />
	<script src="js/jquery.js" type="text/javascript" ></script>
</head>
<body>
<div id="pnlMain">
	<br />
	<br />
	<table cellSpacing="0" cellPadding="0" align="center" border="0">
		<tr>
			<td colSpan="2"><img height="18" alt="" src="images/login-ii_r1_c1.jpg" width="676" border="0" name="loginii_r1_c1"></td>
			<td rowSpan="3"><img height="439" alt="" src="images/login-ii_r1_c8.jpg" width="14" border="0" name="loginii_r1_c8"></td>
		</tr>
		<tr>
			<td width="13" rowSpan="2"><img height="421" alt="" src="images/login-ii_r2_c1.jpg" width="13" border="0" name="loginii_r2_c1"></td>
			<td><img height="272" alt="" src="images/login-ii_r2_c2.jpg" width="663" border="0" name="loginii_r2_c2"></td>
		</tr>
		<tr>
			<td vAlign="middle" align="center" background="images/login-ii_r3_c100.jpg" height="149">
				<table width="100%" border="0">
					<tr>
						
                        <td align="right" width="200">
                        <img src="images/mylogo.gif" />
                         </td>
						<td>
							<table id="Login1" cellspacing="0" cellpadding="0" border="0" style="border-collapse:collapse;">
	<tr>
		<td>
                              <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" align="center">
                                  <tr>
                                      <td align="right"><img height="68" src="images/login-ii_r4_c4.jpg" width="78"></td>
                                      <td align="left" colspan="2">
                                          <table border="0" cellpadding="0" width="246" align="center">
                                            <tr align="center"> 
                                              <td colspan="3"><span style="COLOR: #ff0000"> </span></td>
                                            </tr>
                                              <tr>
                                                  <td align="right"><label for="txtUserName" id="Login1_UserNameLabel">用户名：</label></td>
                                                  <td colspan="2">
                                                      <input name="txtUsername" type="text" id="txtUsername" style="width:145px;" />
                                                      <span id="Login1_UserNameRequired" title="User Name is required." style="color:Red;visibility:hidden;">*</span>
                                                  </td>
                                              </tr>
                                              <tr>
                                                  <td align="right">
                                                      <label for="txtPassword" id="Login1_PasswordLabel">密码：</label></td>
                                                  <td colspan="2">
                                                      <input name="txtPassword" type="password" id="txtPassword" style="width:145px;" />
                                                      <span id="Login1_PasswordRequired" title="Password is required." style="color:Red;visibility:hidden;">*</span>
                                                  </td>
                                              </tr>
                                              
                                              <tr>
                                              <td></td>
                                                  <!--<td colspan="2">
                                                      <input id="Login1_RememberMe" type="checkbox" name="Login1$RememberMe" /><label for="Login1_RememberMe">记住我</label>&nbsp;&nbsp;&nbsp;<span style="color: red"></span>
                                                  </td>-->
                                              </tr>
                                              
                                              <tr>
                                                  <td align="right" colspan="3">
                                                      <!--<input type="image" name="btnOK" id="btnOK" border="0" src="images/login-ii_r5_c6.jpg"  style="height:29px;width:65px;border-width:0px;" />-->
                                                  <img alt="登录" src="images/login-ii_r5_c6.jpg" style="height:29px;width:65px;border-width:0px;" id="btnOK" src="images/login-ii_r5_c6.jpg" />
                                                  </td>
                                              </tr>
                                          </table>
                                      </td>
                                  </tr>
                              </table>
                          </td>
	</tr>
</table>
						</td>
					</tr>
				</table>
        </td>
		</tr>
		<tr>
			<td colSpan="3"><img title="用户登陆" height="30" alt="用户登陆" src="images/login-ii_r8_c1.jpg" width="690" border="0">
			</td>
		</tr>
	</table>
    
<center><a href="http://www.verygood.com" target="_blank" style="font-size:12px;text-decoration: none;"><font color="black">天佳软件科技有限公司,版权所有</font> <font color="blue"> www.verygood.com</font></a></center>

<div id="updateProgress" style="display:block; top:40%;">
    <div id="progressBackgroundFilter" ></div>
    <div id="processMessage">正在处理数据，请稍等...<br /><br /><img alt="Loading" src="images/loading_16.gif" /></div>
</div>

</div>
<script type="text/javascript">
//<![CDATA[
    jQuery(document).ready(function() {

        jQuery("#updateProgress").hide();

        document.getElementById("txtUsername").focus();
        document.getElementById("btnOK").onclick = submitForm;

        jQuery("#updateProgress").ajaxStart(function() {
            jQuery(this).show();
        }).ajaxStop(function() {
            jQuery(this).hide();
        }).ajaxError(function(event, request, settings) {
            alert("出现了错误！没有链接到数据库。");
        });

        jQuery("#txtUsername").keydown(function(e) {

            if (e.keyCode == 13) {
                if (document.getElementById("txtPassword").value.length == 0) {
                    document.getElementById("txtPassword").focus();
                }
            }
        });
        jQuery("#txtPassword").keydown(function(e) {
            if (e.keyCode == 13) {
                submitForm();
                //alert(e.keyCode);
            }
        });
    });

    function submitForm() {
    
        var username = $("#txtUsername").val();
        var password = $("#txtPassword").val();
        if (username == null || username.length == 0) {
            alert("用户帐号必须填写！");
            return;
        }
        if (password == null || password.length == 0) {
            alert("密码必须填写！");
            
            return;
        }
        $.post(
                    "AllowAccess/LoginHandler.ashx",
                    { "username": username, "password": password },
                    function(data) {
                        var response = data;
                        //alert(data);
                        //window.location = 'Default.aspx';
                        if (data && data != "0") {
                            window.location = 'Default.aspx';
                        }
                        else {

                            alert("用户帐号或密码不正确。");

                        }
                    },
                    "text");
    }
//]]>
</script>
    
</body>
</html>
